﻿namespace SportStore.Core.Data
{
    /// <summary>
    /// Defines generic repository interface.
    /// </summary>
    public interface IRepository<T>
    {
        /// <summary>
        /// Add the specified entity.
        /// </summary>
        void Add(T entity);

        /// <summary>
        /// Updates the specified entity.
        /// </summary>
        void Update(T entity);

        /// <summary>
        /// Deletes the specified entity.
        /// </summary>
        void Delete(T entity);

        /// <summary>
        /// Gets the given entity by id.
        /// </summary>
        T GetById(int id);
    }
}
